﻿@model ICDA.Web.Models.UserModel
@{
    ViewBag.Title = "MyAccount";
}
@section cssJavascript
{
    <script src="@Url.Content("~/Scripts/ajaxupload.js")" type="text/javascript"></script>
}
<script type="text/javascript">
    $(document).ready(function () {
        $("#editImage").hide();
        $("#userThumb").mouseover(function () {
            $("#editImage").slideUp(300).delay(800).fadeIn(400);
        }).mouseout(function () {
            $("#editImage").delay(2200).hide(1);
        });
        //lightbox to upload image start
        $("a#show-panel").click(function () {
            $("#lightbox, #lightbox-panel").fadeIn(300);
            $('#lightbox-panel').animate({ 'opacity': '1.00' }, 300, 'linear');
            $('#lightbox, #lightbox-panel').css('display', 'block');
        })
        $("#close-panel").click(function () {
            $("#lightbox, #lightbox-panel").fadeOut(300);
        });
       
        var thumb = $('img#userThumb');
        new AjaxUpload('#imageUpload', {
            action: '@Url.Action("SaveUserImage")',
            name: 'image',
            onSubmit: function (file, extension) {
                $('#userThumb').addClass('loading');
            },
            onComplete: function (file, response) {

                thumb.load(function () {
                    $('#userThumb').removeClass('loading');
                    thumb.unbind();
                });
                thumb.attr('src', '@Url.Action("GetUserImage")');
                $('#msg').append("<strong>Image Uploaded Successfully</strong>");
            }
        });
        //lightbox to upload image end
    });
</script>
<div class="tabscontainer">
    <div class="tabs">
        <div class="tab selected first" id="tab_menu_1">
            <div class="link">@Html.ActionLink("My Profile", "MyAccount", "Account")</div>
            <div class="arrow">
            </div>
        </div>
        <div class="tab last" id="tab_menu_2">
            <div class="link">
                @Html.ActionLink("Change Password", "ChangePassword", "Account")
            </div>
        </div>
    </div>
    @using (Html.BeginForm())
    {
        @Html.ValidationSummary(true, "User Has been updated successfully")
        <div class="curvedContainer">
            <div class="tabcontent" id="tab_content_1" style="display: block">
                <div class="Accountcontainer">
                    <div style="width: 100%; float: left; padding-bottom: 8px;">
                        <div class="UserImage">
                            <div id="lightbox" style="display: none;">
                            </div>
                            <div id="lightbox-panel" style="display: none;">
                                <div id="close-panel">
                                    x</div>
                                <div class="upload">
                                    <input type="file" id="imageUpload" size="20" class=" " />
                                    <p id="msg">
                                    </p>
                                </div>
                            </div>
                            <div class="lCa">
                                <div class="l-lHa">
                                    <div class="g-s-Sa-R vCa">
                                        <div class="g-oa-Sa-R-ca">
                                            <div class="g-oa-Sa-R-N">
                                                <img id="userThumb" src="@Url.Action("GetUserImage", "Account")" style="cursor: pointer;display: block;" width="160px" height="170px" class="userImg l-tk photo" alt=""/>
                                            </div>
                                        </div>
                                        <div class="ZAa cz" id="editImage">
                                            <a href="#" id="show-panel" style="text-decoration: none;">Change profile photo</a></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="UserDetails">
                            <div class="Accountformtr">
                                <div class="myaccountlabes">
                                    @Html.LabelFor(m => m.Name) :
                                </div>
                                <div class="myaccountfield">
                                    @Html.DisplayFor(m => m.Name)
                                </div>
                            </div>
                            <div class="Accountformtr">
                                <div class="myaccountlabes">
                                    @Html.LabelFor(m => m.EmailID) :
                                </div>
                                <div class="myaccountfield">
                                    @Html.DisplayFor(m => m.EmailID)
                                </div>
                            </div>
                            <div class="Accountformtr">
                                <div class="myaccountlabes">
                                    @Html.LabelFor(m => m.DOB) :
                                </div>
                                <div class="myaccountfield">
                                    @Html.DisplayFor(m => m.DOB)
                                </div>
                            </div>
                            <div class="Accountformtr">
                                <div class="myaccountlabes">
                                    @Html.LabelFor(m => m.ManagerName) :
                                </div>
                                <div class="myaccountfield">
                                    @Html.DisplayFor(m => m.ManagerName)
                                </div>
                            </div>
                            <div class="Accountformtr">
                                <div class="myaccountlabes">
                                    @Html.LabelFor(m => m.CSCJoiningDate) :
                                </div>
                                <div class="myaccountfield">
                                    @Html.DisplayFor(m => m.CSCJoiningDate)
                                </div>
                            </div>
                            <div class="Accountformtr">
                                <div class="myaccountlabes">
                                    @Html.LabelFor(m => m.TeamName) :
                                </div>
                                <div class="myaccountfield">
                                    @Html.DisplayFor(m => m.TeamName)
                                </div>
                            </div>
                            <div class="Accountformtr">
                                <div class="myaccountlabes">
                                    @Html.LabelFor(m => m.CUGNumber) :
                                </div>
                                <div class="myaccountfield">
                                    @Html.DisplayFor(m => m.CUGNumber)
                                </div>
                            </div>
                            <div class="Accountformtr">
                                <div class="myaccountlabes">
                                    @Html.LabelFor(m => m.ProjectJoiningDate) :
                                </div>
                                <div class="myaccountfield">
                                    @Html.DisplayFor(m => m.ProjectJoiningDate)
                                </div>
                            </div>
                            <div class="Accountformtr">
                                <div class="myaccountlabes">
                                    @Html.LabelFor(m => m.Location) :
                                </div>
                                <div class="myaccountfield">
                                    @Html.DisplayFor(m => m.Location)
                                </div>
                            </div>
                            <div class="Accountformtr">
                                <div class="myaccountlabes">
                                    @Html.LabelFor(m => m.SkillSets) :
                                </div>
                                <div class="myaccountfield">
                                    @Html.DisplayFor(m => m.SkillSets)
                                </div>
                            </div>
                        </div>
                    </div>
                    <div style="height: 10px; float: left; width: 100%;">
                    </div>
                    <div class="accountEditButton">
                        <a href="@Url.Action("EditMyInfo")" class="button orange medium">Edit</a>
                    </div>
                </div>
            </div>
        </div>
    }
</div>
